VERSION 5.00
Begin VB.Form SetBitDespDlg 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "采集格式设置"
   ClientHeight    =   3015
   ClientLeft      =   2760
   ClientTop       =   3750
   ClientWidth     =   5250
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3015
   ScaleWidth      =   5250
   ShowInTaskbar   =   0   'False
   Begin VB.OptionButton Option9 
      Caption         =   "YUV422"
      Height          =   375
      Left            =   2040
      TabIndex        =   10
      Top             =   2280
      Width           =   1335
   End
   Begin VB.OptionButton Option8 
      Caption         =   "YUV444"
      Height          =   375
      Left            =   2040
      TabIndex        =   9
      Top             =   1800
      Width           =   1335
   End
   Begin VB.OptionButton Option7 
      Caption         =   "RGB5515"
      Height          =   375
      Left            =   2040
      TabIndex        =   8
      Top             =   1320
      Width           =   1335
   End
   Begin VB.OptionButton Option6 
      Caption         =   "RGB565"
      Height          =   375
      Left            =   2040
      TabIndex        =   7
      Top             =   840
      Width           =   1335
   End
   Begin VB.OptionButton Option5 
      Caption         =   "RGB8332"
      Height          =   375
      Left            =   2040
      TabIndex        =   6
      Top             =   360
      Width           =   1335
   End
   Begin VB.OptionButton Option4 
      Caption         =   "32位采集"
      Height          =   375
      Left            =   480
      TabIndex        =   5
      Top             =   1920
      Width           =   1335
   End
   Begin VB.OptionButton Option3 
      Caption         =   "24位采集"
      Height          =   375
      Left            =   480
      TabIndex        =   4
      Top             =   1440
      Width           =   1215
   End
   Begin VB.OptionButton Option2 
      Caption         =   "RGB1555"
      Height          =   375
      Left            =   480
      TabIndex        =   3
      Top             =   960
      Width           =   1215
   End
   Begin VB.OptionButton Option1 
      Caption         =   "8位采集"
      Height          =   375
      Left            =   480
      TabIndex        =   2
      Top             =   480
      Width           =   1335
   End
   Begin VB.CommandButton CancelButton 
      Caption         =   "取消"
      Height          =   375
      Left            =   3960
      TabIndex        =   1
      Top             =   1680
      Width           =   975
   End
   Begin VB.CommandButton OKButton 
      Caption         =   "确定"
      Height          =   375
      Left            =   3960
      TabIndex        =   0
      Top             =   600
      Width           =   975
   End
End
Attribute VB_Name = "SetBitDespDlg"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim res As Boolean
Dim S1 As Integer
Dim S2 As Integer

Option Explicit

Private Sub CancelButton_Click()
Unload Me
End Sub

Private Sub Form_Initialize()
S1 = 4
S2 = 4
End Sub

Private Sub Form_Load()

Select Case S2
Case 1: Option1.Value = True
Case 2: Option2.Value = True
Case 3: Option3.Value = True
Case 4: Option4.Value = True
Case 5: Option5.Value = True
Case 6: Option6.Value = True
Case 7: Option7.Value = True
Case 8: Option8.Value = True
Case 9: Option9.Value = True
End Select

End Sub

Private Sub OKButton_Click()

S2 = S1

Select Case S2
Case 1: res = Form1.MVDEVICE1.SetColorFormat(0, 0)
Case 2: res = Form1.MVDEVICE1.SetColorFormat(0, 1)
Case 3: res = Form1.MVDEVICE1.SetColorFormat(0, 2)
Case 4: res = Form1.MVDEVICE1.SetColorFormat(0, 3)
Case 5: res = Form1.MVDEVICE1.SetColorFormat(0, 4)
Case 6: res = Form1.MVDEVICE1.SetColorFormat(0, 5)
Case 7: res = Form1.MVDEVICE1.SetColorFormat(0, 6)
Case 8: res = Form1.MVDEVICE1.SetColorFormat(0, 7)
Case 9: res = Form1.MVDEVICE1.SetColorFormat(0, 8)
End Select
 Form1.Refresh
 Unload Me
End Sub

Private Sub Option1_Click()
S1 = 1
Form1.Refresh
End Sub

Private Sub Option2_Click()
S1 = 2
Form1.Refresh
End Sub

Private Sub Option3_Click()
S1 = 3
Form1.Refresh
End Sub

Private Sub Option4_Click()
S1 = 4
Form1.Refresh
End Sub

Private Sub Option5_Click()
S1 = 5
Form1.Refresh
End Sub

Private Sub Option6_Click()
S1 = 6
Form1.Refresh
End Sub

Private Sub Option7_Click()
S1 = 7
Form1.Refresh
End Sub

Private Sub Option8_Click()
S1 = 8
Form1.Refresh
End Sub

Private Sub Option9_Click()
S1 = 9
Form1.Refresh
End Sub
